package org.achao.listeners;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author achao
 * @description Rabbit MQ 监听 -- 接收消息
 * @date 2023/10/4 18:40
 */
@Slf4j
@Component
public class MyRabbitMqListen {

    @RabbitListener(queues = {"hello.study.1", "hello.study.2"})
    public void listenStudyQueue(String msg) {
        log.info("消费者收到了hello.study.1|2的消息【{}】", msg);
    }
}
